<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
     <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>我的中心界面</title>
</head>
<c:set var="user" value="${user }" scope="session"/>
<c:if test="${user==null }">
	<jsp:forward page="login.jsp">
		<jsp:param value="mycenter.jsp" name="jumpto"/>
	</jsp:forward>
</c:if> 
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
	$(function(){
		$("#changeinfo").click(function(){
			$(".userinfo").attr("disabled",false);
		});
		function subchangeinfo(){
			$(".userinfo").attr("disabled",true);
		}
		function subchangepwd(){
			$("input[name^='password']").prop("disabled",true);
			alert();
		}
		
	});
</script>
<body>
<div id="user">
	<div>
		<h3><a href="javascript:void(0);" onclick="">用户信息</a></h3><button id="changeinfo">修改</button>
		<form action="" method="post" autocomplete="on">
			<table>
			  <tr>
			    <th>用户名：</th>
			    <td><input class="userinfo" type="text" name="username" value="${user.uname }" disabled="disabled"></td>
			  </tr>
			  <tr>
			    <td>邮箱:</td>
			    <td><input class="userinfo" type="text" name="email" value="${user.uemail }" disabled="disabled"></td>
			  </tr>
			</table>
			<input type="submit" value="确定" onclick="subchangeinfo();">
       </form> 
       <h3><a href="javascript:void(0);" onclick="">修改密码</a></h3>
       <form action="">
       		旧密码：<input type="password" name="password_old" placeholder="请输入旧密码"/>
       		新密码：<input type="password" name="password_new_1" placeholder="请输入新密码"/>
       		重复新密码：<input type="password" name="password_new_2" placeholder="重复输入新密码"/>
       		<input type="submit" value="确定" onclick="subchangepwd();">
       </form>
       <h3><a href="javascript:void(0);" onclick="">问卷统计</a></h3>
       <form action="">
       		问卷统计
       </form>
	</div>
</div>
</body>
</html>
